package com.koron.sinoprobe.web.plan.mapper;

import com.koron.sinoprobe.web.ledger.bean.query.SpPlanMilestoneQuery;
import com.koron.sinoprobe.web.plan.bean.entity.SpPlanMilestone;
import com.koron.sinoprobe.web.plan.bean.vo.SpPlanMilestoneVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SpPlanMilestoneMapper {

    int addBatch(List<SpPlanMilestone> depts);

    SpPlanMilestoneVO getById(String id);

    /**
     * 根据id更新实际开始时间，实际结束时间，状态，进度
     * @param bean
     * @return
     */
    int updateById(SpPlanMilestone bean);

    int updateNotStart(SpPlanMilestone bean);

    int deleteBySpId(@Param("spId") String spId);

    List<SpPlanMilestoneVO> getBySpId(@Param("spId") String spId);

    List<SpPlanMilestoneVO> queryList(SpPlanMilestoneQuery query);

    List<String> queryNameList(@Param("name") String name);

    String findLastMilestone(String spId);
}
